package uuid

import (
	"gitee.com/doraemon1996/bunny/env"
)

var (
	gen *UuidGen
)

func init() {
	gen = NewUuidGen(env.NodeID(), env.SourceString())
}

func GenUint64FromArgs(nodeID, timestamp, sequence uint64) uint64 {
	return gen.GenUint64FromArgs(nodeID, timestamp, sequence)
}

func GenUint64() uint64 {
	return gen.GenUint64()
}

func DecodeUint64(num uint64) (uint64, uint64, uint64) {
	return gen.DecodeUint64(num)
}

func GenStringFromUint64(num uint64) string {
	return gen.GenStringFromUint64(num)
}

func DecodeStringToUint64(str string) (uint64, error) {
	return gen.DecodeStringToUint64(str)
}

func GenString() string {
	return gen.GenString()
}

func DecodeString(str string) (uint64, uint64, uint64, error) {
	return gen.DecodeString(str)
}
